const list = [
  'transferCategory',
  'transferNodeNo',
  'transferMethod',
  'fuelType',
  'transferRate',
  'distance',
  'weight',
  'dosage'
];

function getRules(list: string[]) {
  const resRules: Record<string, any> = {};
  list.forEach(item => {
    resRules[item] = [
      {
        required: true,
        message: '必填项',
        trigger: ['submit', 'blur', 'change']
      }
    ];
  });
  return resRules;
}

export const rules = getRules(list);
